<div class="picture_thumbnail <%= @size %>" id="picture_<%= picture.id %>">
  <span class="picture_tool select">
    <%= check_box_tag "picture_ids[]", picture.id %>
  </span>
  <% if picture.deletable? && can?(:destroy, picture) %>
  <div class="picture_tool delete">
    <sl-tooltip content="<%= Alchemy.t('Delete image') %>">
      <%= link_to_confirm_dialog(
        render_icon("delete-bin-2"),
        Alchemy.t(:confirm_to_delete_image_from_server),
        alchemy.admin_picture_path(
          picture,
          search_filter_params.merge(
            page: params[:page],
            size: @size.presence
          ).to_h
        )
      ) -%>
    </sl-tooltip>
  </div>
  <% end %>
  <% if can?(:edit, picture) %>
    <% picture_index ||= picture_offset + picture_iteration.index %>
    <%= link_to alchemy.admin_picture_path(
      picture,
      search_filter_params.merge(
        picture_index: picture_index.to_i + 1,
        size: @size.presence
      ).to_h
    ) do %>
      <%= render Alchemy::Admin::PictureThumbnail.new(picture, size: @size) %>
    <% end %>
  <% else %>
    <%= render Alchemy::Admin::PictureThumbnail.new(picture, size: @size) %>
  <% end %>
  <span class="picture_name" title="<%= picture.name %>">
    <%= picture.name %>
  </span>
  <div class="picture_tags">
  <% picture.tag_list.each do |tag| %>
    <span class="tag"><%= tag %></span>
  <% end %>
  </div>
</div>
